#include <stdio.h>
int mac(int a, int b)
{
	return(a + b);
}
int mbc(int a, int b)
{
	return(a - b);
}
int mcc(int a, int b)
{
	return(a * b);
}
int mdc(int a, int b)
{
	return(a / b);
}
int main()
{
	int l = 0;
	int d = 0;
	int r = 0;
	; scanf_s("%d %d %d", &l, &d, &r);
	if (r == 0)
	{
		int q = mac(l, d);
		printf("%d", q);
	}
	else if (r == 1)
	{
		int w = mbc(l, d);
		printf("%d", w);
	}
	else if (r == 2)
	{
		int e = mcc(l, d);
		printf("%d", e);
	}
	else
	{
		int x = mdc(l, d);
		printf("%d", x);
	}

	return 0;
}